import mysql.connector
import pandas

config = {
    "host": "127.0.0.1",
    "port": "3306",
    "database": "sql_store",
    "user": "root",
    "password": "system"
}

conn = mysql.connector.connect(**config)

df = pandas.read_sql(
    """
select
    *
from
    products
""",
    conn)

print(df)


# curs = conn.cursor()

# curs.execute(
# """
# select
#     product_id,
#     name,
#     quantity_in_stock,
#     unit_price
# from
#     products
# """)

# rst = curs.fetchall()

# for item in rst:
#     print(item)

# curs.close()
conn.close()
